package com.shared;

import java.io.Serializable;

public class Token implements Serializable {
    private String access;
    private String refresh;
    
    public String getAccess () { return this.access;   }
    public String getRefresh() { return this.refresh; }
    
    public Token () {} // for gwt serialisation
    
    public Token (String access, String refresh) {
        this.access  = access;
        this.refresh = refresh;   
    }
    
    public void update (String accessLocal, String refreshLocal) {
        this.access  = accessLocal;
        this.refresh = refreshLocal;          
    }
    
    public void update (Token token) {
        this.access  = token.getAccess();
        this.refresh = token.getRefresh();
    }
    public String toString () {
        return this.access + " - " + this.refresh;
    }
}
